﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/WithoutPermBasic.Master" AutoEventWireup="true" CodeBehind="TMMaterialChangeSubmit.aspx.cs" Inherits="PMS.WaitDealUI.TMMaterialChangeSubmit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        var DealId = com.get.DealId;
        $(function () {
            $("#tbList").datagrid({
                url: '/Logic/CommonAjax/WaitDealAjax.aspx?method=CommonWaitDealList',
                loadMsg: '数据加载中请稍后……',
                fitColumns: true,
                rownumbers: true,
                idField: "ID",
                singleSelect: true,
                queryParams: { DealId: DealId },
                striped: true,
                columns: [[{ field: 'ck', checkbox: true, width: 30 },
                 { field: 'BatchCode', title: '批号 ', align: "center", width: 200 },
                 { field: 'taskCode', title: '生产制号 ', align: "center", width: 100 },
                 { field: 'PROJ', title: '项目名称 ', align: "center", width: 100 },
                 { field: 'EngName', title: '工程名称 ', align: "center", width: 100 },
                 { field: 'EngType', title: '设备类型 ', align: "center" },
                 { field: 'MaState', title: '材料类别 ', align: "center", width: 80 },
                  { field: 'AddPerson', title: '制单人 ', align: "center", width: 80 },
                   { field: 'FillDate', title: '制单日期 ', align: "center", width: 150 },
                 {
                     field: 'TotalState', title: '审核状态', align: "center", formatter: function (value, row, index) {
                         return com.getArrayText(StaticCombo.reviewState, value);
                     }
                 }]], onDblClickRow: function (rowIndex, rowData) {

                     top.wrapper.addTab(rowData.BatchCode, "/ViewAuditUI/TM/AuditMaChange.aspx?action=view&reviewId=" + rowData.ReviewId)
                 }

            });
        });
    </script>
    <script type="text/javascript">

        function funcEdit() {
            var row = $('#tbList').datagrid('getSelected');
            if (row) {

                top.wrapper.addTab(row.BatchCode, "/UI/TM/MaChangeSubmit.aspx?TotalId=" + row.ID)

            }
            else {
                com.message("information", "请选中一行");
            }
        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceToorbar" runat="server">
    <a href="javascript:void(0)" id="Search" class="easyui-linkbutton" onclick="funcEdit()"
        data-options="iconCls:'icon-edit',plain:true">编辑</a> &nbsp;&nbsp;
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <table id="tbList" title="材料变更计划 " style="height: 400px; width: 100%">
    </table>
</asp:Content>
